import openpyxl

myBook=openpyxl.load_workbook('收入表.xlsx')
myRows=list(myBook.worksheets[0].values)
myRowIndex=4
while myRowIndex<len(myRows):
	myRowSum=sum(myRows[myRowIndex][1:4])
	myBook.worksheets[0].cell(myRowIndex+1,5).value=myRowSum
	myRowIndex+=1
myBook.save('收入表.xlsx')
